<!--
Date: 2025-08-13
Copyright (c) 2025 Industrial Software Feature Database
-->
<template>
  <div>
    <el-select v-bind="itemConfig.props" v-model="rulFormModel[itemConfig.prop]">
      <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
    </el-select>
  </div>
</template>

<script setup>
const { itemConfig, rulFormModel } = defineProps({
  itemConfig: Object,
  rulFormModel: Object
});
// 备选项处理
const options = ref([]);
if (itemConfig.options.length) {
  options.value = itemConfig.options;
} else if (!itemConfig.options.length && itemConfig.initOptions) {
  options.value = await itemConfig.initOptions();
}
</script>

<style lang="scss" scoped></style>
